from django.db import models
# Create your models here.
class ClassInfoBackend(models.Model):
    MODE_CHOICES = (
        (0, u'Mooc'),
        (1, u'SPOC'),
        (2, u'通识'),
        (3, u'公开课'),
    )
    CATEGORY_CHOICES=(
        ("0", u'教育学'),
        ("1", u'教育技术学'),
        ("2", u'心理学'),
        ("3", u'比较教育学'),
        ("4", u'成人教育学'),
        ("5", u'小学教育'),
    )
    name=models.CharField(max_length=20,verbose_name="课程名字",null=False)
    cname=models.CharField(max_length=20,verbose_name="班级名字",null=False)
    mode=models.IntegerField(max_length=2,verbose_name="开课模式",null=False,choices=MODE_CHOICES)
    limit=models.CharField(max_length=50,verbose_name="开放限制",null=False)
    category=models.CharField(max_length=20,verbose_name="课程归属分类",null=False,choices=CATEGORY_CHOICES)
    unit=models.CharField(max_length=50,verbose_name="课程归属单位",null=False)
    tags=models.CharField(max_length=50,verbose_name="标签",null=True)
    begindate=models.DateField(verbose_name="开始时间")
    finaldate=models.DateField(verbose_name="结束时间")
    hour=models.IntegerField(null=False,verbose_name="课时")
